<extend name="Public/base"/>

<block name="body">
   
 
    <script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
    <div class="main-title">
        <h2>设置视频精选 【{$video.title}】 <button class="btn btn-default btn-return" onclick="javascript:history.back(-1);return false;"><i class="glyphicon glyphicon-share-alt"></i> 返 回</button></h2>
    </div>

    <div class="tab-content">
    <form action="" method="post" class="form">
             
            <div class="form-item form-group">
                <label class="item-label">推荐在日期<span class="check-tips"></span></label>
                <div class="controls">
                    <label class="input-large">
                        <input type="text" class="text input-small form-control time" name="date" value="{$date|default=date('Y-m-d')}"
                        placeholder="推荐日期">
                    </label>
                </div>
            </div>
            
            <div class="form-item form-group">
                <label class="item-label">推荐理由<span class="check-tips"></span></label>
                <div class="controls">
                    <label class="input-large">
                        <textarea class="textarea form-control" rows="3" name="reason">{$reason|htmlspecialchars_decode}</textarea>
                    </label>
                </div>
            </div>

            <div class="form-item form-group cf">
                <label class="item-label">封面<span class="check-tips">(推荐16:9)</span></label>
                <div class="controls">
                    <div class="controls">
                        <input type="file" id="upload_picture_cover">
                        <input type="hidden" name="cover" id="cover_id_cover" value="{$cover}" />
                        <div class="upload-img-box">
                            <notempty name="cover">
                            <div class="upload-pre-item"><img src="{:url_format($cover)}"/></div>
                            </notempty>
                        </div>
                    </div>
                    {:hook('adminPicUpload', array('id'=>"upload_picture_cover",'return'=>"cover_id_cover", 'type' => 'path'))}                                                              
                </div>
            </div>

        <div class="form-item form-action">
            <input type="hidden" name="id" value="{$id}" />
            <input type="hidden" name="video_id" value="{$video_id}" />
            <button class="btn submit-btn ajax-post btn-success btn-block" id="submit" type="submit" target-form="form">确 定</button>
            <!-- <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button> -->
        </div>
    </form>
    </div>
    <div id="video-pre">
        <video controls="controls" autoplay="autoplay"></video>
    </div>
</block>

<block name="script">
    <script src="__STATIC__/thinkbox/jquery.thinkbox.js"></script>
    <link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
    <php>if(C('COLOR_STYLE')=='blue_color') echo '<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">';</php>
    <link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
    <script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
    <script type="text/javascript">
        //导航高亮
        highlight_subnav('{:U('index')}');
         $(function(){
            $('.time').datetimepicker({
                format: 'yyyy-mm-dd',
                language:"zh-CN",
                minView:2,
                autoclose:true
            });
        });
    </script>
</block>
